package com.yamanyar.weebill.view;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.yamanyar.weebill.domain.User;
import com.yamanyar.weebill.service.UserService;

/**
 * List users. Created in Jun 28, 2008.
 * 
 * @author Kaan Yamanyar
 */
@Component("listUser")
@Scope("request")
public class ListUsers implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3156916209497186641L;
	private List<User> users;
	private UserService userService;

	@Autowired
	public ListUsers(UserService userService) {
		this.userService = userService;
		users = this.userService.findAll();
	}

	public List<User> getUsers() {
		return users;
	}

	public void setUsers(List<User> users) {
		this.users = users;
	}

}
